]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell-tray-manager: Disconnect theme_widget signals on finalize
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 19 Aug 2017 18:56:15 +0000 (20:56 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 20 Aug 2017 16:03:32 +0000 (18:03 +0200)
The theme widget passed to shell_tray_manager_manager_screen() is simply
a means to receive style information. There is nothing which ties the two
object's life cycles together, so it is entirely possible for the tray to
be finalized with the widget still around - we shouldn't try to update the
stale object on widget style changes, so make sure we properly disconnect
the signal handler.

https://bugzilla.gnome.org/show_bug.cgi?id=786526

src/shell-tray-manager.c

index a1a6b3a0c2466fdba3556fa85ac738531672c3ad..c58e9519ca307dbe65dd718e8d1e9948571e9f4f 100644 (file)
@@ -223,8 +223,9 @@ shell_tray_manager_manage_screen (ShellTrayManager *manager,
 
   na_tray_manager_manage_screen (manager->priv->na_manager, gdk_screen);
 
-  g_signal_connect (theme_widget, "style-changed",
-                    G_CALLBACK (shell_tray_manager_style_changed), manager);
+  g_signal_connect_object (theme_widget, "style-changed",
+                           G_CALLBACK (shell_tray_manager_style_changed),
+                           manager, 0);
   shell_tray_manager_style_changed (theme_widget, manager);
 }